package com.copm.ifm.servers.sys.mapping;

import com.copm.ifm.servers.sys.entity.SysDict;
import com.copm.ifm.servers.sys.vo.SysDictVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * 系统字典表实体对象映射方法类
 *
 * @author zzf
 * @date 2020/7/17 15:11
 */
@Mapper
public interface SysDictMapping {

    SysDictMapping INSTANCE = Mappers.getMapper(SysDictMapping.class);

    /**
     * 持久化对象转数据传输对象
     *
     * @param dict
     * @return
     */
    @Mapping(source = "enName", target = "name")
    SysDictVO po2dto(SysDict dict);

}